public class Main {
    public static void main(String[] args){

        int a=10;
        int b=20;
        System.out.println(a&b);
        System.out.println(a|b);

        int c = 0xf;
        System.out.printf("%x\n", ~c);
        
        int e=0x1;
        int f=0x2;
        System.out.printf("%x\n",e^f);
    }
}
